import { TModifyFieldConfig } from "../../../Message/Db/Tables/TModifyFieldConfig";
import { ConfigManager } from "../../../com/gengine/resource/ConfigManager";
//class ModifyFieldConfig
    
    export  class ModifyFieldConfig
    {
        constructor()
        {
            
            this._list = new Array<any>();
            if (ModifyFieldConfig._instance != null) 
            {
                throw new Error(" modifyFieldConfig 单例 ");
            }
            this.init();
            return;
        }

        /* internal  */write(arg1: Object): void
        {
            var loc1=null;
            var loc2=null;
            var loc3=0;
            var loc4=arg1;
            for(loc2 of loc4) 
            {
                loc1 = new TModifyFieldConfig();
                loc1.fieldtype = loc2.fieldtype;
                loc1.des = loc2.des;
                this._list.push(loc1);
            }
            return;
        }

        public init(): void
        {
            var loc1=ConfigManager.instance.getJSONByFileName("t_modify_field_config.json");
            this.write(loc1);
            return;
        }

        public getAllList(): Array<any>
        {
            return this._list;
        }

        public static get instance(): ModifyFieldConfig
        {
            if (ModifyFieldConfig._instance == null) 
            {
                ModifyFieldConfig._instance = new ModifyFieldConfig();
            }
            return ModifyFieldConfig._instance;
        }

        /* internal */ /* var */_list: Array<any>;

        /* internal */ static /* var */_instance: ModifyFieldConfig;
    }
